<?=View::factory('admin/common/header')?>
<div id="content">
  <div class="breadcrumb">
    <a href="<?=URL::site('admin')?>">管理首页</a>
    &raquo; <a href="<?=URL::site('admin/manager')?>">管理员列表</a>
    &raquo; 编辑管理员
  </div>
  <?=View::factory('admin/common/message')?>
  <div class="box">
    <div class="heading">
      <h1><img src="<?=URL::base()?>images/admin/user.png" alt="" /> 编辑管理员</h1>
      <div class="buttons">
        <input type="button" onclick="$('#form').ajax_post({redirect:'<?=URL::site('admin/manager')?>'});" class="btn45" value="保存" /> &nbsp;
        <input type="button" onclick="history.back();" class="btn45" value="返回" />
      </div>
    </div>
    <div class="content">
      <form method="post" enctype="multipart/form-data" id="form" onsubmit="return $('#form').ajax_post({redirect:'<?=URL::site('admin/manager')?>'});">
        <table class="form">
          <tr>
            <td width="120">管理员角色 <span class="required">*</span></td>
            <td><select name="role_id">
              <option value="0"></option>
              <? foreach ($roles as $role) { ?>
              <option value="<?=$role['role_id']?>" <?=($role['role_id']==$role_id)?'selected':''?>><?=$role['role_name']?></option>
              <? } ?>
            </select></td>
          </tr>
          <tr>
            <td>登录邮箱 <span class="required">*</span></td>
            <td><input type="text" size="30"  maxlength="50" name="email" value="<?=$email?>" disabled="disabled" /></td>
          </tr>
          <tr>
            <td>登录密码 <span class="required">*</span></td>
            <td><input type="password" size="30"  maxlength="50" name="password"> &nbsp;
            <font color=gray>不输入新密码，则不修改密码，密码不少于6个字符</font></td>
          </tr>
          <tr>
            <td>再次输入密码 <span class="required">*</span></td>
            <td><input type="password" size="30"  maxlength="50" name="confirm"></td>
          </tr>
          <tr>
            <td>昵称 <span class="required">*</span></td>
            <td><input type="text" size="30"  maxlength="50" name="nickname" value="<?=$nickname?>"> &nbsp;
            <font color=gray>可输入中文/字母/数字做为昵称，不包含特殊符号</font></td>
          </tr>
          <tr>
            <td>状态</td>
            <td><label><input type="radio" name="status" value="<?=Member::NORMAL?>" <?=($status==Member::NORMAL)?'checked':''?> /> <?=Member::status(Member::NORMAL, FALSE)?></label>
            <label><input type="radio" name="status" value="<?=Member::LOCKED?>" <?=($status==Member::LOCKED)?'checked':''?> /> <?=Member::status(Member::LOCKED, FALSE)?></label>
            <label><input type="radio" name="status" value="<?=Member::NOTACT?>" <?=($status==Member::NOTACT)?'checked':''?> /> <?=Member::status(Member::NOTACT, FALSE)?></label>
            </td>
          </tr>
        </table>
      </form>
    </div>
</div>
<?=View::factory('admin/common/footer')?>
<script type="text/javascript">
$().ready(function(){
    $('#system').addClass('selected');
});
</script>